using System;
using System.Collections.Generic;

namespace OAuth.Net.Common
{
    /// <summary>
    /// Flags enumeration to indicate which sources should be used to collate OAuth parameters from. As this is a flags enumeration,
    /// different sources can be combined.
    /// </summary>
    [Flags]
    public enum OAuthParameterSources
    {
        /// <summary>
        /// The parameters should be collated from none
        /// of the available sources. This should value not 
        /// be used.        
        /// </summary>
        None = 0,

        /// <summary>
        /// The HTTP Authorization header should be used
        /// to collate parameters from.     
        /// </summary>
        HttpAuthorizationHeader = 1,

        /// <summary>
        /// The HTTP POST body should be used to collate
        /// parameters from (with a content-type of
        /// application/x-www-form-urlencoded)     
        /// </summary>        
        HttpPostBody = 2,

        /// <summary>
        /// The HTTP query string should be used to 
        /// collate parameters from.     
        /// </summary>       
        HttpQueryString = 4,

        /// <summary>
        /// The HTTP WWW-Authenticate header should be used to 
        /// collate parameters from.     
        /// </summary>       
        HttpWwwAuthenticateHeader = 8,

        /// <summary>
        /// Default sources for service providers are: the 
        /// Authorization header, POST body and query string.     
        /// </summary>        
        ServiceProviderDefault = HttpAuthorizationHeader | HttpPostBody | HttpQueryString,

        /// <summary>
        /// Default sources for consumers are: the 
        /// WWW-Authenticate header and the POST body.
        /// </summary>        
        ConsumerDefault = HttpWwwAuthenticateHeader | HttpPostBody
    }
}
